package com.xckj.teacher.ui.fragment

import com.xckj.teacher.R
import com.xckj.teacher.databinding.DialogDeleteGroupBinding
import com.xckj.teacher.framework.BaseDialogFragment


class DeleteDialog(var title: String, var back: () -> Unit) :
    BaseDialogFragment<DialogDeleteGroupBinding>(2) {

    override fun loadLayout(): Int {
        return R.layout.dialog_delete_group
    }

    override fun initData() {
        dataBinding?.tvTitle?.text = "确定删除 ${title} 分组吗？"
        dataBinding?.ivDelete?.setOnClickListener {
            dismiss()
        }
        dataBinding?.cancel?.setOnClickListener {
            dismiss()
        }
        dataBinding?.sure?.setOnClickListener {
            back()
            dismiss()
        }

    }

}